package com.fortune.dao;

import com.fortune.dto.in.mSpecification.SpecificationAddDto;
import com.fortune.dto.in.mSpecification.SpecificationEditDto;
import com.fortune.dto.in.mSpecification.SpecificationListDto;
import com.fortune.vo.mSpecification.MSpecification;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface MSpecificationDao {

    /**
     * 查询规格码表
     * @param companyId
     * @param specificationListDto
     * @return
     */
    List<MSpecification> queryMSpecificationList(@Param("companyId") String companyId,@Param("specificationListDto") SpecificationListDto specificationListDto);

    /**
     * 查询规格码表个数
     * @param companyId
     * @param specificationListDto
     * @return
     */
    int queryMSpecificationListCount(@Param("companyId") String companyId,@Param("specificationListDto") SpecificationListDto specificationListDto);

    /**
     * 添加规格
     * @param companyId
     * @param specificationAddDto
     */
    int addMSpecification(@Param("companyId") String companyId, @Param("specificationAddDto") SpecificationAddDto specificationAddDto);

    /**
     * 编辑规格
     * @param companyId
     * @param specificationEditDto
     * @return
     */
    int editMSpecification(@Param("companyId") String companyId, @Param("specificationEditDto") SpecificationEditDto specificationEditDto);

    /**
     * 删除规格
     * @param companyId
     * @param specificationId
     * @return
     */
    int deleteMSpecification(@Param("companyId") String companyId, @Param("specificationId") String specificationId);

    /**
     * 添加时查重
     * @param companyId
     * @param specificationAddDto
     * @return
     */
    int queryAddMSpecificationExist(@Param("companyId") String companyId, @Param("specificationAddDto") SpecificationAddDto specificationAddDto);

    /**
     * 编辑时查重
     * @param companyId
     * @param specificationEditDto
     * @return
     */
    int queryEditMSpecificationExist(@Param("companyId") String companyId, @Param("specificationEditDto") SpecificationEditDto specificationEditDto);

    /**
     * 查询规格码表
     * @param companyId
     * @return
     */
    List<MSpecification> queryProduceMSpecificationList(String companyId);
}
